#include "head.h"
#define MAX_PROCESS (5)
void fork_test()
{
    size_t i;
    for (i = 0; i < MAX_PROCESS; i++)
    {
        if (fork() == 0)
        {
            // printf("pid=%d i=%ld\n",getpid(),i);
            break;
        }
    }
    if (i == MAX_PROCESS)
    {
        DEBUG_MSG("parent:%d\n", getpid());
        while (1)
        {
        }
    }
    else
    {
        DEBUG_MSG("child:%d\n", getpid());
        while (1)
        {
        }
    }
}